"""Delivery_project URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from commons.views import *
from django.urls import path
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
# 评论
router.register("comment", CommentModelSet)
# 回复评论
router.register("comment_treply", CommentReplySet)

urlpatterns = [
    # 将回复信息添加到表中
    path("comment_show/", CommentShowAPIView.as_view()),
    # 查看该商家的评论信息
    path("merchant_comment/", Merchant_comment.as_view()),
    # 用户查看订单商家的评论
    path("comment_user/", CommentUser.as_view()),
]
urlpatterns+=router.urls